package com.quad.innovators.salesease.model.form.warehouse;

import com.fasterxml.jackson.annotation.JsonInclude;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;import lombok.Data;

import java.io.Serializable;import java.math.BigDecimal;

/**
 * @author : shanshan.li
 * @createTime : 2024/10/20 11:45
 * @Version : 1.0 
 */
@Schema(description = "采购单信息详情对象")
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class PurchaseOrderDetailForm implements Serializable {

    @Schema(description = "订单详情code")
    private String code;

    @NotBlank(message = "产品code")
    @Schema(description = "产品code")
    private String productCode;

    @NotBlank(message = "产品名称不能为空")
    @Schema(description = "产品名称")
    private String productName;

    @NotBlank(message = "产品规格不能为空")
    @Schema(description = "产品规格")
    private String productSpecification;

    @NotBlank(message = "产品包装规格不能为空")
    @Schema(description = "产品包装规格")
    private String productPacking;

    @NotBlank(message = "产品条码不能为空")
    @Schema(description = "产品条码")
    private String productUniqueCode;

    @NotBlank(message = "产品保质期不能为空")
    @Schema(description = "产品保质期")
    private String productShelfLife;

    @Schema(description = "打款状态")
    private Integer paymentStatus;

    @Min(value = 1, message = "订货数量不能小于1")
    @NotBlank(message = "订货数量不能为空")
    @Schema(description = "产品订货数量")
    private Integer purchaseNumber;

    @Schema(description = "产品价格")
    @Min(value = 0, message = "产品价格不能为负数")
    @NotBlank(message = "产品价格不能为空")
    private BigDecimal purchasingPrice;

    @Schema(description = "备注信息")
    private String remark;
}
